﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalInfo.aspx.cs" Inherits="WeChat.UserInfo.PersonalInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0">
    <script src="../bootstrap-3.3.5-dist/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>

    <link href="../css/weui.css" rel="stylesheet" />
    <title>个人信息</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul, ol {
            list-style: none;
        }

        .top1 {
            padding-left: 18px;
            height: 42px;
            background: #e1e3e9;
            line-height: 42px;
            font-size: 17px;
            color: #6c6f6e;
            border-bottom: 2px solid #d5d7d5
        }

            .top1 p {
                float: left;
            }

            .top1 input {
                float: right;
                margin: 7px;
                width: 60px;
                height: 26px;
                font-size: 13px;
                color: 747676;
                border: 1px solid #d8dadc;
                border-radius: 8px;
            }

        .top2 {
            height: 20px;
            background: #e1e3e9;
        }

        .top3 {
            height: 50px;
            padding: 10px;
            font-size: 16px;
            color: #6c7a92;
            line-height: 26px;
        }

            .top3 p {
                float: left;
                margin-top: 15px;
            }

            .top3 span {
                font-size: 13px;
                color: #6c7a92;
                display: inline;
            }

            .top3 img {
                width: 80px;
                height: 80px;
                float: right;
                margin-right: 15px;
            }

        section {
            padding-left: 18px;
        }

            section ul li {
                line-height: 40px;
                font-size: 15px;
                color: #7b899d;
                border-bottom: 1px solid #f2f2f1;
            }

                section ul li p span {
                    float: right;
                    margin-right: 5px;
                }

        footer {
            text-align: center;
            padding: 15px 30px 10px 30px;
        }

            footer a {
                display: block;
                width: 100%;
                height: 30px;
                line-height: 30px;
                text-decoration: none;
                color: #fff;
                background-color: #427DBF;
                border-radius: 8px;
                transition: 5 linear;
                -moz-transition: 5 linear;
            }
                footer a:active {
                    color: red;
                }
    </style>
    <script type="text/javascript">
        $(function () {
            $.ajax({
                url: "../Ajax/BinDing.ashx",
                type: "post",
                data: { BinDingType: "Displaykh" },
                success: function (data) {
                    if (data == 0) {
                        $("#Bing").css("background", "chartreuse");
                        $("#Bing").val("未绑定卡号");
                    } else if (data == 1) {
                        $("#Bing").css("background", "#B4B4B4");
                        $("#Bing").val("已绑定卡号");
                        $("#Bing").attr("disabled", true);
                    }
                }
            });
        });

        var state ='<%=state %>';
        var openid = '<%=openid %>';
        $(document).ready(function () {
            if (state == "32") {
                $("#changeState").val("挂失");
                $("#changeState").on("click", function () {
                    $('#Div1').show();
                });
            } else if (state == "96") {
                $("#changeState").val("解挂");
                $("#changeState").on("click", function () {
                    $('#Div2').show();
                });
            }
        });
        var cardNum = '<%=cardNum %>';
        function reportLoss() {
            $.ajax({
                type: "POST",
                url: "../AjaxSets.ashx",
                data: { cardNum: cardNum, state: state, functionName: "reportLoss" },
                success: function (data) {
                    $('#Div1').hide();
                    if (data == "1") {
                        $('#tips').text("预挂失成功！");
                    } else if (data == "2") {
                        $('#tips').text("预解挂成功！");
                    } else if (data == "3") {
                        $('#tips').text("挂失成功！");
                    } else if (data == "4") {
                        $('#tips').text("解挂成功！");
                    } else {
                        $('#tips').text("操作失败。errcode:" + data);
                    }
                    $('#dialog2').show();
                },
                Error: function (errMsg) {
                    $('#Div1').hide();
                    $('#tips').text(errMsg);
                    $('#dialog2').show();
                }
            });
        }
        function lifted() {
            $.ajax({
                type: "POST",
                url: "../AjaxSets.ashx",
                data: { cardNum: cardNum, state: state, functionName: "lifted" },
                success: function (data) {
                    $('#Div1').hide();
                    if (data == "1") {
                        $('#tips').text("预挂失成功！");
                    } else if (data == "2") {
                        $('#tips').text("预解挂成功！");
                    } else if (data == "3") {
                        $('#tips').text("挂失成功！");

                    } else if (data == "4") {
                        $('#tips').text("解挂成功！");
                    } else {
                        $('#tips').text("操作失败。errcode:" + data);
                    }
                    $('#dialog2').show();
                },
                Error: function (errMsg) {
                    $('#Div1').hide();
                    $('#tips').text(errMsg);
                    $('#dialog2').show();
                }
            });
        }

        function unbind(openid) {
            $.ajax({
                type: "POST",
                url: "../AjaxSets.ashx",
                data: { openid: openid, functionName: "unbind" },
                success: function (data) {
                    if (data == "1") {
                        $('#dialog1').hide();
                        $('#dialog2').show();
                    } else {
                    }
                },
                Error: function (errMsg) {

                }
            });
        }
        function unbinding() {
            unbind(openid);
        }

        function binding() {
            window.location.href = "WeChat/../Binding.aspx?openid=" + openid;
        }
        function Bing() {
            window.location.href = "../Updaterfkh.aspx";
        }
    </script>
</head>

<body>
    <div class="bwrap" runat="server">
        <header>
     <div class="top1">
        <p>个人信息</p>
		    <%--	<a href='../index.html'  style="width:auto; font-size:15px;  text-decoration:none; position: absolute;  right:1px; top:0px; border-radius:10%; align-content:center; color:#fff; background-color:#04be02;border: 1px solid #04be02;" class="btn btn-default dropdown-toggle" >返回首页</a>--%>
<%--        <input id="changeState" type="button" value="挂失" />--%>
     </div>
     <div class="top2" style="display:none"></div>
     <div class="top3">
	<ul>
	<li><asp:Label ID="name" Font-Size="17px" runat="server"></asp:Label></li>
	<li>账 号 <asp:Label ID="number" runat="server"></asp:Label></li>
	</ul>

	

        
        <%--<p>陈思睿<span>卡号：101425</span></p>--%>
        <%--<img src="../head.jpg" >--%>
         
     </div>
     <div class="top2"></div>
   </header>
        <section>
      <ul>
        <li><p>性 别<span><asp:Label ID="sex" runat="server"></asp:Label></span></p></li>
        <li><p>部 门<span><asp:Label ID="department" runat="server"></asp:Label></span></p></li>
        <li><p>余 额<span><asp:Label ID="accounts" runat="server"></asp:Label></span></p></li>
        <li><p>押 金<span><asp:Label ID="deposit" runat="server"></asp:Label></span></p></li>
	    <li><p>补贴余额<span><asp:Label ID="btye" runat="server"></asp:Label></span></p></li>
        <li><p>卡类型<span><asp:Label ID="cardtype" runat="server"></asp:Label></span></p></li>
        <li><p>卡状态<span><asp:Label ID="cardState" runat="server"></asp:Label></span></p></li>
        <li><p>照片质量<span><asp:Label ID="photoQuality" runat="server"></asp:Label></span></p></li>
        <li><p>卡 号<span><asp:Label ID="cardname" runat="server"></asp:Label></span></p></li>
<%--        <li><p>开户日期<span><asp:Label ID="opendate" runat="server"></asp:Label></span></p></li>--%>
        <li><p>开户有效日期<span><asp:Label ID="yxq" runat="server"></asp:Label></span></p></li>
        <li><p>职 务<span><asp:Label ID="position" runat="server"></asp:Label></span></p></li>
        <li><p>电 话<span><asp:Label ID="tel" runat="server"></asp:Label></span></p></li>
        <li><p>积 分<span><asp:Label ID="integral" runat="server"></asp:Label></span></p></li>
        
      </ul>
   </section>

        <section>

            <footer> <a href="#" id="changeState" style="width:100%; height:35px; color: white; font-size:15px;  border-radius:10px;" type="button" <%--value="挂 失"--%> >挂失/解挂</a></footer>

<%--   <footer> <a href="#" onclick="javascript:$('#dialog1').show();">解除绑定</a></footer>--%>
   <footer> <a href="../UpdatePassword.aspx" onclick="">更改密码</a></footer>

        <footer><a href='../index.html' onclick='javascript :history.back(-1);'>返回首页</a></footer>
    </section>


    </div>

    <%-- 解绑--%>
    <div class="weui_dialog_confirm" id="dialog1" style="display: none;">
        <div class="weui_mask"></div>
        <div class="weui_dialog">
            <div class="weui_dialog_hd"><strong class="weui_dialog_title">提示</strong></div>
            <div class="weui_dialog_bd">解除绑定之后，您需要再次绑定您的账户才能查看相关信息，确定要解绑吗？</div>
            <div class="weui_dialog_ft">
                <a href="javascript:$('#dialog1').hide();" class="weui_btn_dialog default">取消</a>
                <a href="#" class="weui_btn_dialog primary" onclick="unbinding()">确定</a>
            </div>
        </div>
    </div>


    <%--改密--%>
    <%--<div class="weui_dialog_confirm" id="dialog3" style="display: none;">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title">提示</strong></div>
        <div class="weui_dialog_bd">更改密码之后，您需要再次绑定您的账户才能查看相关信息，确定要更改吗？</div>
        <div class="weui_dialog_bd">请输入新密码：<input type="password" name="pwd" id="pwd"  value=""  ></div>
        <div class="weui_dialog_bd">请再次输入新密码：<input type="password" name="repwd" id="repwd" value="" ></div>
        <div class="weui_dialog_ft">
            <a href="javascript:$('#dialog3').hide();" class="weui_btn_dialog default">取消</a>
            <a href="#" class="weui_btn_dialog primary" onclick="updpwd()">确定</a>
        </div>
    </div>
</div>--%>






    <%--挂失--%>
    <div class="weui_dialog_confirm" id="Div1" style="display: none;">
        <div class="weui_mask"></div>
        <div class="weui_dialog">
            <div class="weui_dialog_hd"><strong class="weui_dialog_title">提示</strong></div>
            <div class="weui_dialog_bd">确定要挂失该卡吗？</div>
            <div class="weui_dialog_ft">
                <a href="javascript:$('#Div1').hide();" class="weui_btn_dialog default">取消</a>
                <a href="#" class="weui_btn_dialog primary" onclick="reportLoss()">确定</a>
            </div>
        </div>
    </div>

    <div class="weui_dialog_confirm" id="Div2" style="display: none;">
        <div class="weui_mask"></div>
        <div class="weui_dialog">
            <div class="weui_dialog_hd"><strong class="weui_dialog_title">提示</strong></div>
            <div class="weui_dialog_bd">确定要解除挂失吗？</div>
            <div class="weui_dialog_ft">
                <a href="javascript:$('#Div2').hide();" class="weui_btn_dialog default">取消</a>
                <a href="#" class="weui_btn_dialog primary" onclick="lifted()">确定</a>
            </div>
        </div>
    </div>



    <div class="weui_dialog_alert" id="dialog2" style="display: none;">
        <div class="weui_mask"></div>
        <div class="weui_dialog">
            <div class="weui_dialog_hd"><strong class="weui_dialog_title">提示</strong></div>
            <div class="weui_dialog_bd" id="tips">解除绑定成功！</div>
            <div class="weui_dialog_ft">
                <a id="A1" href="PersonalInfo.aspx" class="weui_btn_dialog primary">关闭</a>
                <%--<a id="A2" href="#" class="weui_btn_dialog primary" onclick="binding()">重新绑定</a>--%>
            </div>
        </div>
    </div>



    <%-- 改密成功--%>
    <%--<div class="weui_dialog_alert" id="dialog3" style="display: none;">
    <div class="weui_mask"></div>
    <div class="weui_dialog">
        <div class="weui_dialog_hd"><strong class="weui_dialog_title">提示</strong></div>
        <div class="weui_dialog_bd" id="tips">更改密码成功！</div>
        <div class="weui_dialog_ft">
            <a id="A1" href="javascript:wx.closeWindow();" class="weui_btn_dialog primary">关闭</a>
           
        </div>
    </div>
</div>--%>
</body>
</html>
